<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="header.jsp"%>
<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_title">
            <h2>添加学生 <i class="fa fa-user"></i></h2>
            <div class="clearfix"></div>
        </div>
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/teacher/addStudent" method="post">
            <div class="x_title">
                <h2>单个学生添加</h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content1">
                <div class="item form-group">
                    <div style="color: red">${error}</div>
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学号 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="userId" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="name">
                    </div>
                </div>

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学院<span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="college">
                            <c:forEach var="colleges" items="${colleges}">
                                <option value="${colleges.college}">
                                        ${colleges.college}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">入学年份 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="year" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">所在班级 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" name="classs" class="form-control col-md-7 col-xs-12">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">专业 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="major">
                            <c:forEach var="majors" items="${majors}">
                                <option value="${majors.major}" <c:if test="${student.major==majors.major}">selected="selected"</c:if>>
                                        ${majors.major}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="radio" name="sex" value="0">男
                        <input type="radio" name="sex" value="1" >女
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">联系电话 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="mobilePhone">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">班主任<span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="teacher">
                            <c:forEach var="teachers" items="${teachers}">
                                <option value="${teachers.teacherId}">
                                        ${teachers.name}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div style="text-align: center">
                    <button type="submit" name="status" class="btn btn-success">添加</button>
                    <button type="button" class="btn btn-primary" onclick="javascript:window.history.back(-1);">返回</button>
                </div>
            </div>
        </form>
        <br/><br/><br/>
    </div>
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_title">
            <h2>添加学生 <i class="fa fa-user"></i>${student.name}</h2>
            <div class="clearfix"></div>
        </div>
            <div class="x_title">
                <h2>通过Excel添加</h2>
                <div class="clearfix"></div>
            </div>
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/teacher/portExcel" method="post">
            <div class="item form-group">
                <div style="color: red">${eError}</div>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">导出excel模板<span class="required">*</span></label>
                    <input type="text" name="path" value="C:\Users\Object\Desktop">
                    <button type="submit" class="btn btn-success">导出excel</button>
                </div>
            </div>
        </form>
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/teacher/exParseExcel" method="post">
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">导入excel<span class="required">*</span></label>
                    <input type="text" name="excel" placeholder="请输入文件所在位置">
                    <button type="submit" class="btn btn-success">导入并添加</button>
                </div>
        </form>
        <br/><br/><br/>
<%@include file="footer.jsp"%>